#pragma once
#include "Encrypter.h"
#include "PublicKey.h"

namespace kryptos { namespace cryptography {

class PKEncrypter : public Encrypter
{
public:

    PKEncrypter(const PublicKey& pubkey);

    // Encrypter interface
    virtual int encryptFile(const std::string &filepath, const std::string &output);
    virtual int encryptFile(const std::string &filepath, std::ostream &output);
    virtual int encryptAndEncodeFile(const std::string &filepath, std::ostream &output);

    virtual int encryptBuffer(const char* buffer, int len, std::vector<char> &output);
    virtual int encryptAndEncodeBuffer(const char* buffer, int len, std::vector<char> &output);

    virtual int decryptFile(const std::string &filepath, const std::string &output);
    virtual int decryptFile(std::istream &filepath, std::ostream &output);
    virtual int decryptBuffer(const char* buffer, int len, std::vector<char> &output);

    //virtual void setSessionKey(const char* sessionkey, int len);


    //virtual int signBuffer(const char* buffer, int len, std::vector<char> &output);
    //virtual int signFile(const std::string &filepath);

protected:

    const PublicKey m_key;
    //QByteArray      m_sessionKey;
};

}}
